<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0">
	    <!-- Loading Bootstrap -->
	    <link href="{{__PUBLIC__}}/Admin/Flat/dist/css/vendor/bootstrap.min.css" rel="stylesheet">
	    <!-- Loading Flat UI -->
	    <link href="{{__PUBLIC__}}/Admin/Flat/dist/css/flat-ui.css" rel="stylesheet">
	    <script type="text/javascript" src="{{__PUBLIC__}}/jquery-1.8.2.min.js"></script>
	    <script type="text/javascript" src="{{__PUBLIC__}}/Admin/hdjs/hdjs.min.js"></script>
	    <link rel="stylesheet" type="text/css" href="{{__PUBLIC__}}/Admin/hdjs/hdjs.css"/>
	</head>
	<body>
		<form onsubmit="return hd_submit(this,'{{U('Category/edit')}}','{{U('Category/index')}}')">
			<div class="alert alert-success">编辑分类</div>
			<div class="form-group">
				<label for="exampleInputEmail1">分类名称</label>
				<input id="exampleInputEmail1" class="form-control" type="text" placeholder="请输入分类名称" name="cname" value="{{$oldData['cname']}}">
			</div>
			<div class="form-group">
				<label for="exampleInputEmail1">所属分类</label>
				<select name="pid" class="form-control">
						<option value="0" selected="">顶级分类</option>
					{{foreach from="$cateData" value="$v"}}
						<option value="{{$v['cid']}}" {{if value="$oldData['pid'] eq $v['cid']" }} selected {{endif}}>{{$v['_name']}}</option>
					{{endforeach}}
				</select>
			</div>
			<div class="form-group">
				<label for="exampleInputEmail1">所属类型</label>
				<select name="type_tid" class="form-control">
						{{foreach from="$type" value="$v"}}
							<option value="{{$v['tid']}}" {{if value="$v['tid'] eq $oldData['type_tid']" }} selected {{endif}}>{{$v['typename']}}</option>
						{{endforeach}}
				</select>
			</div>
			<div class="form-group">
				<label for="exampleInputEmail1">分类排序</label>
				<input id="exampleInputEmail1" class="form-control" type="text" placeholder="请输入分类排序" name="csort" value="10">
			</div>
			<input type="hidden" name="cid" value="{{$oldData['cid']}}">
			<button class="btn btn-primary btn-block" type="submit"> 确定 </button>
		</form>
	</body>
</html>
